//
// option_5.cpp for 202loi in /home/morel_t//Rendu/maths/202loi
// 
// Made by thomas morel
// Login   <morel_t@epitech.net>
// 
// Started on  Fri Mar  9 17:27:16 2012 thomas morel
// Last update Fri Mar  9 17:55:17 2012 thomas morel
//

#include <string>
#include <iostream>
#include "202loi.h"
#include "Table.hh"

static void	header(std::string **tab)
{
  tab[0][1] = "E";
  tab[0][2] = "Var";
  tab[1][0] = "Z";
}

void		option_5(t_tab *tab)
{
  tab->tab5 = new Table(3, 2);

  header(tab->tab5->getSTab());
  tab->tab5->getSTab()[1][1] = toString(esperance_x(tab->tab1->getSTab()) +
					esperance_y(tab->tab1->getSTab()));
  tab->tab5->getSTab()[1][2] = toString(variance_x(tab->tab1->getSTab()) +
					variance_y(tab->tab1->getSTab()));
  // tab->tab5->printTab();
}
